"""
继承
"""
class Animal():
    def __init__(self,name,age):
        self.name = name
        self.age = age
    def show(self):
        return f"姓名{self.name}，年龄：{self.age}"
class Dog(Animal):#继承Animal
    def __init__(self,name,age,color):
        super().__init__(name,age)
        self.color = color

    def show(self):
        return f"姓名{self.name}，年龄：{self.age}，颜色{self.color}"

dog = Dog("xiaogou",2,"black")
print(dog.show())
